import request from "@/utils/request";

/**
 * 获取订单列表
 */

export function getOrderDetailPage(page, pageSize, params) {
  return request({
    url: `/api/UsOrder/${page}/${pageSize}`,
    method: "get",
    params,
  });
}

/**
 * 新增订单
 */
export function addOrder(data) {
  return request({
    url: "/api/UsOrder/save",
    method: "post",
    data,
  });
}

/**
 * 删除订单
 */
export function deleteOrder(id) {
  return request({
    url: `/api/UsOrder/delete/${id}`,
    method: "delete",
  });
}

/**
 * 查询订单详情
 */
export function getOrderDetail(id) {
  return request({
    url: `/api/UsOrder/${id}`,
    method: "get",
  });
}

/**
 * 修改订单
 */
export function updateOrder(data) {
  return request({
    url: "/api/UsOrder/update",
    method: "post",
    data,
  });
}
